using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;

public class PatientDialog : MonoBehaviour,IPointerClickHandler
{
    // Start is called before the first frame update

    private string[] TextList;
    public GameObject DialogBox;
    public TextMeshProUGUI DialogText;
    private DialogType getDialogType;


    public static PatientDialog instance;
    
        
    private void Awake()
    {
        instance = this;
    }
    

    public  void GetPatienDialogText(int type)
    {
        TextList=ConversationDb.Patiendialogs[(int)type];
        int Index=Random.Range(0, TextList.Length);
        DialogText.text = TextList[Index];
    }


    public void Prompt(string prompt)
    {
        DialogText.text = prompt;
    }

    public void OnPointerClick(PointerEventData eventData)
    {
        Destroy(DialogBox.gameObject);
    }


}
